public class User {
    private String accountid;
    private String password;
    private String emailid;

    public User(String accountid, String password) {
        this.accountid = accountid;
        this.password = password;
    }

    public User(String accountid, String password, String emailid) {
        this.accountid = accountid;
        this.password = password;
        this.emailid = emailid;
    }

    public void printInfoUser() {
        System.out.println("账号：" + accountid +
                ",密码:" + password +
                ",邮箱:" + (emailid != null ? emailid : "未填"));
    }

    public static void main(String[] args) {
        User User1 = new User("001", "001mima");
        User User2 = new User("002", "002mima", "001@qq.com");
        User1.printInfoUser();
        User2.printInfoUser();

    }
}
